package org.jupiter.blog.service.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.jupiter.blog.api.domain.JupiterCategory;

import java.util.List;

@Mapper
public interface JupiterCategoryMapper {

	int insert(JupiterCategory category);

	JupiterCategory selectByUuid(@Param("uuid") String uuid);

	List<JupiterCategory> selectAll();

	int updateByUuidSelective(JupiterCategory category);

	int deleteByUuid(@Param("uuid") String uuid);

	List<JupiterCategory> selectByPage(
		@Param("name") String name,
		@Param("offset") int offset,
		@Param("limit") int limit
	);

	long countByQuery(@Param("name") String name);

	List<JupiterCategory> selectActiveCategories();
}
